home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d1 / freemacs.arc / REFERENC.DOC < prev    next >
Text File  |  1988-03-17  |  32KB  |  715 lines

  1.         The Reference Guide to Emacs Functions
  2.  
  3.  
  4. MINT:
  5.  
  6.     The input to the MINT processor consists of strings of characters.
  7. Certain combinations of strings, namely #(...) and ##(...), invoke functions.
  8. The body of the function is separated by commas into arguments (no commas
  9. means one argument) that are evaluated from left to right.  The first argument
  10. is assumed to be the name of a function, and the value is computed by
  11. supplying the arguments to the function.  If the function was the single sharp
  12. #(...) form, the value is rescanned; otherwise the value is passed over
  13. without rescanning.  The form (...), where the interior string contains
  14. balanced parentheses, protects the interior string from evaluation.  The
  15. processor simply strips the outer parentheses and passes by the interior.
  16. If '**' is the multiply function and '++' the addition function, then the input
  17. string
  18.  
  19.         ((3+4))*9 = #(**,#(++,3,4),9)'
  20.  
  21. will evaluate to
  22.  
  23.         (3+4)*9 = 63
  24.  
  25. Note that 3+4 is to be surrounded by parentheses.  To prevent them from 
  26. being interpreted as protection parentheses, they must themselves be 
  27. surrounded by a pair of protection parentheses.
  28.  
  29.     Interior to the processor are three structures: the active
  30. string, the neutral string, and the scan pointer.  A convenient
  31. visualization is to think of the neutral string on the left, the scan
  32. pointer in the middle, and the active string on the right.  The scan
  33. pointer always points at the left of the active string, looking at the
  34. first character.  Normally characters move from the active to neutral
  35. string, where they are accumulated until there are enough to form all the
  36. arguments of some function.  Then the function is evaluated and the
  37. result put back in the active or neutral string according to the function
  38. type.
  39.  
  40.  
  41. The scanning algorithm:
  42.  
  43.     The algorithm consists of 10 numbered steps.  When the processor is
  44. executed, it begins by going to step 1.  Throughout the algorithm there are
  45. mentions of marking the neutral string in various ways.  Think of these
  46. markers as flags attached to the affected characters (of course, the markers
  47. are accompanied by pointers, pointing backwards though the neutral string).
  48.  
  49.     1. Clear the processor by emptying the neutral string, deleting the
  50.     contents of the active string, if any, filling the active string with
  51.     the string #(d,#(g)), and setting the scan pointer to the first
  52.     character of the active string.  Perform a redisplay of the current
  53.     text buffer if there are no characters in the input buffer.
  54.  
  55.     2. Examine the character under the scan pointer.  If there is none -
  56.     that is, if the active string is the null string - return to step 1.
  57.     Note that the neutral string may still contain characters.
  58.  
  59.     3. If the character under the scan pointer is a horizontal tab,
  60.     carriage return, or line feed, delete it, advance the scan pointer,
  61.     and return to step 2.
  62.  
  63.     4. If the character under the scan pointer is a left parenthesis,
  64.     delete it and scan forward until the matching right parenthesis is
  65.     found. After all of the intervening characters have been moved without
  66.     change to the neutral string, the right parenthesis deleted, and the
  67.     scan pointer moved to the character following the right parenthesis,
  68.     return to step 2.  If the matching right parenthesis cannot be found,
  69.     go back to step 1 without giving an error.
  70.  
  71.     5. If the character under the scan pointer is a comma, delete it, mark
  72.     the rightmost character of the neutral string as the end of one
  73.     argument, advance the scan pointer, and return to step 2.
  74.  
  75.     6. If the character under the scan pointer is a sharp sign and the
  76.     next character is a left parenthesis, an active function
  77.     is beginning.  Delete the sharp sign and the left parenthesis, advance
  78.     the scan pointer beyond them, mark the rightmost character of the 
  79.     neutral string as the beginning of both an argument and an active
  80.     function, and return to step 2.
  81.  
  82.     7. If the character under the scan pointer is a sharp sign and the
  83.     next two characters are another sharp sign and a left
  84.     parenthesis, a neutral function is beginning.  Delete the triple ##(,
  85.     advance the scan pointer beyond them, mark the rightmost character of
  86.     the neutral string as the beginning of both an argument and a neutral
  87.     function, and return to step 2.
  88.  
  89.     8. If the character under the scan pointer is a sharp sign that did
  90.     not meet the conditions of step 6 or 7, move it to the right end of
  91.     the neutral string, advance the scan pointer, and return to step 2.
  92.  
  93.     9. If the character under the scan pointer is a right parenthesis, a
  94.     function is ending.  Delete the right parenthesis, advance the scan
  95.     pointer, and mark the rightmost character of the neutral string as the
  96.     end of an argument and the end of a function.  Now the neutral string
  97.     from the rightmost begin function marker to the just inserted end
  98.     function marker constitutes a MINT function invocation.  (If there is
  99.     no begin function marker in the neutral string, return to step 1
  100.     without giving an error.)  The first argument is assumed to be the
  101.     name of a MINT function.  If the argument is two characters long, and
  102.     is the name of a built-in function, that function is evaluated with
  103.     the given arguments: extra arguments are ignored and missing ones are
  104.     automatically supplied as the null string.  If the function is not
  105.     built-in, a default built-in function is executed.  The result
  106.     of the function is catenated to the right of the neutral string if the
  107.     function was marked as neutral and to the left of the active string if
  108.     marked active; in the latter case, the scan pointer is reset to the
  109.     leftmost character of the new active string.  Check the head of the
  110.     keyboard buffer.  If the key is the break key for your system (Z-100
  111.     uses Shift-Help, IBM-PC uses Ctrl-Prtsc) then input that key and go
  112.     to step one, otherwise return to step 2.
  113.  
  114.     10. If the character under the scan pointer did not meet any of the
  115.     conditions of steps 3 through 9, attach it to the right of the neutral
  116.     string, delete it from the active string, advance the scan pointer,
  117.     and return to step 2.
  118.  
  119.  
  120. The MINT functions:
  121.  
  122.      The MINT functions are listed here in their active forms, but
  123. each can be called in neutral mode as well.  The value of a function is
  124. always a string; any function, particularly those whose most important
  125. activity is a side effect, might return the null string.  In addition to
  126. the structures already mentioned, the processor can store strings in an
  127. area called string storage.  Each string has three parts: a string name,
  128. which may be any string whatsoever; a string body, which may also be any
  129. string; and a string pointer, which initially points just in front of the
  130. first character of the string body.  The string pointer always points
  131. just before the body, just after it, or between two characters; that is,
  132. it always points into a gap between characters.  Form bodies may include
  133. ordinal parameter markers intermixed with their characters.  Each such
  134. marker has some positive integer associated with it, and these integers
  135. need not be distinct.
  136.  
  137. #(ds,N,B) "Define String"
  138.     This null-valued function creates a string with name N and body B
  139. with its string pointer just before the first character of B.  If there is
  140. a string with name N already, its previous body and string pointer are lost.
  141.  
  142. #(mp,N,P1,P2,...) "Make Parameter"
  143.     This null-valued function creates parameter markers in the
  144. string N.  The non-null arguments P1,P2..., are processed in turn from left
  145. to right (null arguments are ignored).  Argument Pi is processed in the
  146. following way.  The body of string N is scanned from left to right for the
  147. first substring exactly equal to Pi.  The matching substring must not
  148. contain any already-existing parameter markers.  If it does not, the
  149. substring is taken out of the string body and an ordinal parameter marker
  150. numbered i replaces it.  The matching process begins again at the
  151. character following the marker.  The string pointer is replaced at the left
  152. end of the string when the searching is finished.  A string may be
  153. searched more than once.
  154.     Parameter markers are represented by characters in the range
  155. 128..255.  Parameter marker 128 is ignored, 129 corresponds to P1, 130
  156. corresponds to P2, etc.
  157.  
  158. #(N,A1,A2,...) "Default"
  159.     The value of this function is the body of the string N with its
  160. parameter markers filled in.   All those parameter markers numbered 1 are
  161. filled with argument N, those numbered 2 with A1, those numbered 3 with
  162. A2, and so on.  Remember that excess arguments are ignored and missing
  163. ones are supplied with the null string.
  164.  
  165. #(gs,N,A1,A2,...) "Get String"
  166.     The value of this function is the body of the string N with its
  167. parameter markers filled in.  All those parameter markers numbered 1 are
  168. filled with argument A1, those numbered 2 with A2, and so on.  Remember
  169. that excess arguments are ignored and missing ones are supplied with the
  170. null string.
  171.  
  172. #(go,N,Z) "Get One (character)"
  173.     The value of this function is the character immediately following
  174. the string pointer in the string N.  The string pointer is advanced just
  175. beyond the selected character.  If the string pointer is already at the
  176. right end of the string, the function value is argument Z returned in
  177. active mode regardless of the mode of the function call.
  178.  
  179. #(gn,N,D,Z) "Get N (characters)"
  180.     The value of this function is a substring of string N.  Starting
  181. at the string pointer and reading right the value is D characters of the
  182. string body.  (The interpretation of a string as a number will be
  183. discussed later.)  The string pointer is moved to point between the
  184. selected substring and the first unread character.  If D is zero, the
  185. value is null and the pointer does not move.  If the string pointer
  186. should move off the end of the string, the function value is argument Z
  187. returned in active mode regardless of the mode of the function call.
  188.  
  189. #(fm,N,X,Z) "First Match"
  190.     The string N is searched rightward from the string pointer for a
  191. substring containing no parameter markers and exactly matching argument X.
  192. If such a match is found, the value of the function is the substring of
  193. the string from the original location to the character immediately
  194. preceding the match and the string pointer is moved just before the
  195. character immediately following the matched substring.  If no match is
  196. found, the argument Z is returned in active mode regardless of the mode
  197. of the function call, and the string pointer is stationary.
  198.  
  199. #(rs,N)    "Restore String"
  200.     This null-valued function restores the string pointer of string N to
  201. its initial position just before the first character of the string.
  202.  
  203. #(es,N1,N2,...) "Erase String"
  204.     This null-valued function erases the strings named N1, N2, ...,
  205. from string storage.
  206.  
  207.  
  208.     MINT performs arithmetic on strings of decimal characters.  The
  209. arithmetic value of a string is given by the longest suffix of the string that
  210. can be described exactly as all decimal digits preceded by at most one plus or
  211. minus sign.  Thus the value of 3 is three; of a-4 is negative four; of ++++200
  212. is two hundred; and of the null string and of abc the null string.  The null
  213. string acts as zero in arithmetic operations.  The result of an arithmetic
  214. operation is itself at least such a decimal string with no leading zeros or
  215. plus signs for positive results and with zero represented as 0.
  216.  
  217. #(++,A,B) "Add"
  218.     The value of this function is the sum of the arithmetic values of
  219. arguments A and B with the nonnumeric prefix of A prefixed to the result.
  220. The prefix of B is lost.
  221.  
  222. #(--,A,B) "Subtract"
  223.     The value of this function is the result of subtracting the
  224. arithmetic value of argument B from that of argument A.  The nonnumeric
  225. prefix of A is prefixed to the resultant decimal string, and the prefix
  226. of B is lost.
  227.  
  228. #(**,A,B) "Multiply"
  229.     The value of this function is the result of multiplying the
  230. arithmetic value of argument B to that of argument A.  The nonnumeric
  231. prefix of A is prefixed to the resultant decimal string, and the prefix
  232. of B is lost.
  233.  
  234. #(//,A,B) "Divide"
  235.     The value of this function is the numeric value of argument A
  236. divided by the numeric value of argument B, and the result is prefixed
  237. with the nonnumeric prefix of A.  The prefix of B is lost.  The division
  238. operation is done in integer mode, and only the integral portion of the
  239. quotient is retained.
  240.  
  241. #(%%,A,B) "Modulo"
  242.     The value of this function is the numeric value of argument A
  243. modulo the numeric value of argument B, and the result is prefixed with
  244. the nonnumeric prefix of A.  The prefix of B is lost.  The modulo
  245. operation is done in integer mode, and only the integral portion of the
  246. modulus is retained.
  247.  
  248. #(g?,A,B,T,F) "Greater"
  249.     The value of is function is the argument T if the arithmetic
  250. value of argument A is greater than the arithmetic value of argument B,
  251. and is argument F otherwise.
  252.  
  253. #(==,A,B,T,F) "Equality"
  254.     The value of this function is the argument T if the argument A is
  255. exactly equal, as a string, to the argument B, and is the argument F
  256. otherwise.  Notice that T and F may be any strings whatever.
  257.  
  258. #(ll,A,F) "Load Library"
  259.     This null-valued function retrieves all of the strings stored in
  260. the file specified by argument A.  The strings are brought back to string
  261. storage, and if some of the strings are already in string storage, their
  262. values are overwritten.  If the argument F is non- null, then string
  263. storage is cleared before loading.
  264.  
  265. #(sl,A,F1,F2,...) "Save Library"
  266.     This null-valued function stores the strings named by arguments F1,
  267. F2, ... in the disk file specified by argument A.
  268.  
  269. #(ls,S,P) "List Strings"
  270.     The value of this function is a list of all the strings whose names
  271. have a prefix of P.  Of course, all strings have a null prefix, so if P is
  272. missing, then all strings are listed.  The string names are separated by the
  273. string S.
  274.  
  275.  
  276.     In addition to the active string, neutral string, and string storage,
  277. Emacs has a text buffer.  This buffer is capable of holding any string of
  278. characters.  Characters in the range zero through 127 may be viewed directly,
  279. while characters in the range 128 through 255 are viewed as the inverse video
  280. representation of the character that is 128 lower in value.  The 
  281. two character combination Carriage Return followed by Line Feed is considered
  282. a newline character, distinct from all other characters.  Emacs considers 
  283. the two characters to be indivisible.  Any operation performed on one is 
  284. performed on the other.  Usually a newline character may be considered as 
  285. one character, except that #(rm,>) will return a newline as two characters.
  286.     The text buffer is most often accessed at a particular position
  287. called the point.  The point is the place at which all insertions and
  288. deletions take place.  The cursor on the screen is placed at the point.
  289.     A mark is another position in the file, used to delimit block
  290. operations, and can be used to set the point.
  291.     A mark is specified by a ASCII character.  Emacs defines certain
  292. marks, called system marks, to have a special value.  The meanings of all the
  293. valid marks are given in a table below.  Any mark, system or user, may be used
  294. when a mark is called for.
  295.     All the user marks are initially set to the beginning of the
  296. file.  Once a mark is set, the mark "sticks" to the character at the
  297. right of the mark, or eof if that's the case.  Therefore, the user marks
  298. tend to the end of the file.
  299.     The global user marks are always available for use.  The number
  300. of global marks is controlled by the value of a negative argument to the
  301. primitive 'pm'.  For example, '#(pm,-3)' creates three global marks - @, A,
  302. and B.  Creating global marks destroys all local marks.
  303.     The local user marks are arranged as a stack.  The primitive 'pm'
  304. is used to push and pop marks.  If you wish to use two local marks, then
  305. you would execute '#(pm,2)'.  This creates two new marks, 0 and 1, which both
  306. have the value of the current point.  When you are finished using the marks,
  307. you would execute '#(pm)'.  You may use at most ten local user marks at
  308. once.
  309.  
  310.     Mark Character    Meaning
  311.     ___________    _______
  312.     @ through Z    Global user marks
  313.     0 through 9    Local user marks.
  314.     <        The character to the left of the point.
  315.     >        The character to the right of the point.
  316.     {        The first blank character to the left of the point.
  317.     }        The first blank character to the right of the point.
  318.     -        The first non-blank character to the left of the point.
  319.     +        The first non-blank character to the right of the point.
  320.     [        The beginning of the file.
  321.     ]        The end of the file.
  322.     ^        The beginning of this line.
  323.     $        The end of this line.
  324.     .        The point.
  325.  
  326. #(rd,F,L) "Redisplay"
  327.     This null-valued function causes the screen to match the text in
  328. the text buffer.  The lines on the screen which do not match the lines in
  329. the text are redrawn.  If the argument F is not null, the screen is
  330. completely redrawn.  If the input buffer is not empty, that is, if a key
  331. is waiting to be executed, redisplay is not performed.  This prevents the
  332. input buffer from overflowing.  If the numeric argument L is non-zero,
  333. the screen is positioned so that the point is on that screen line.  L
  334. must be in the range #(lv,t) through #(lv,b), otherwise the point
  335. will not be moved.
  336.  
  337. #(ba,N,F) "Buffer Allocate"
  338.     This function will create and select a new buffer if N is zero.
  339. The result is the new buffer's number.  The result is zero if there is
  340. not enough memory for a new buffer.  If N is positive, then the buffer
  341. numbered N is selected.  The result is zero if there is no buffer
  342. numbered N.  If N is negative, the result is the number of the currently
  343. selected buffer, which remains selected.  The buffer is selected cheaply
  344. if the argument F is non- null.  In this case, the buffer appears full.
  345. This is provided so that a buffer may be visited quickly.
  346.  
  347. #(bi,N,M) "Buffer Insert"
  348.     This function will insert into the current buffer all the text in
  349. buffer N between buffer N's point and buffer N's mark 'M'.
  350.  
  351. #(is,S)    "Insert String"
  352.     This null-valued function inserts the argument S before the
  353. point.  If the buffer becomes full, the string is not inserted.
  354.  
  355. #(ss,S)    "Set Status"
  356.     This null-valued function displays the argument S at the bottom of
  357. the current window.  #(an,S) will temporarily overwrite the bottom line of
  358. the screen.  The next redisplay will rewrite the status string.
  359.  
  360. #(an,S,F) "Announce"
  361.     This null-valued function displays the string given in argument S
  362. on the status line.  If argument F is null, then the cursor is left following
  363. the string.  If argument F is not null, then the cursor is not positioned
  364. after the string.  If the argument S is null then the next redisplay will
  365. rewrite the argument S given in the previous #(ss,S).
  366.  
  367. Guidelines for announcing things with #(an):
  368.     If the string ends in ..., you are expected to wait for the operation
  369.       to complete.
  370.     If the string ends in ?, you are expected to type a single character.
  371.       If a choice is not given, then you must type 'y' or 'n'.
  372.     If the string ends in !, an error has occurred.
  373.     If the string ends in :, you are expected to type a string terminated
  374.       by return.
  375.     If the string doesn't end in one of the above, it's an advisory message, and
  376.       and is ignorable.
  377.  
  378. #(lv,F)    "Load Variable"
  379.     This function returns a numeric value which is dependent upon the
  380. value of the argument F.  A table of the various values returned versus
  381. the first character of F follows:
  382.      First character of F    Value returned
  383.      --------------------    --------------
  384.      B            Background color (0..7) initially 0
  385.      F            Foreground color (0..7) initially 7
  386.      p            percent of screen allocated to the top window
  387.      o            buffer being displayed in "other" window (0..)
  388.                 if 0, then there is no other window.
  389.      u            window currently in use (1..2)
  390.      l            number of current line (1..32767)
  391.      n            number of lines (1..32767) 
  392.      r            row on screen (-32768..32767)
  393.      c            column on screen (1..255)
  394.      t            top line of screen (1..24)
  395.      b            bottom line of screen (1..24)
  396.      m            flag, zero if buffer not modified (0..1)
  397.      s            percentage of top screen that scrolls (0..100)
  398.      f            percentage of bot screen that scrolls (0..100)
  399.      w            redisplay shows whitespace (0..1)
  400.      none of the above    number of current line (1..32767)
  401.     If #(lv,T) <= #(lv,R) <= #(lv,B) then the cursor is on the screen.
  402.     Otherwise, the cursor is below or above the screen respectively.
  403.  
  404.  
  405. #(sv,F,V) "Store Variable"
  406.     This function sets a numeric value which is dependent upon the value of
  407. the argument F.  A table of the various values set versus the first
  408. character of F follows:
  409.      First character of F    Value set
  410.      --------------------    --------------
  411.      B            Background color (0..7) initially 0
  412.      F            Foreground color (0..7) initially 7
  413.      p            percent of screen allocated to the top window
  414.      o            buffer being displayed in "other" window (0..)
  415.                 if 0, then only one window will be used.
  416.      u            window currently in use (1..2)
  417.      l            the point is moved to the first character of
  418.                 the line V (1..32767)
  419.      n            none
  420.      r            the next redisplay moves the cursor to the
  421.                 Vth row on screen (1..24)
  422.      c            the point is moved to column on screen (1..32767)
  423.      t            none
  424.      b            none
  425.      m            flag, zero if buffer not modified (0..1)
  426.      s            percentage of top screen that scrolls (0..100)
  427.      f            percentage of bot screen that scrolls (0..100)
  428.      w            redisplay shows whitespace (0..1)
  429.      none of the above    number of current line (1..32767)
  430.  
  431.  
  432.  
  433. #(pp)    "Pick Position"
  434.     This function returns a value corresponding to the position specified
  435. by the pick device.  The value consists of two numbers separated by a comma.
  436. The first number is the column being picked, and the second number is the row
  437. being picked.
  438.  
  439.  
  440. #(st,S)    "Syntax Table"
  441.     This null-valued function sets the form to be used as the syntax
  442. table.  The syntax table is used to determine the syntax of a particular
  443. character.  The first character in the form gives the syntax for the null
  444. character.  The 32nd character in the form gives the syntax for the space
  445. character, etc.  If the form is less than 256 characters in length, those
  446. characters that fall off the right end have random syntax.  If argument S
  447. is null, the form previously selected as the syntax table is deleted, or
  448. no form is selected as the syntax table, the syntax reverts to the
  449. default syntax: 0-9, A-Z, and a-z are the only non-blank characters.
  450. The newline character is neither blank nor non-blank.
  451.     The characters are interpreted as bit fields.  The
  452. following bits have the given meaning:
  453.  
  454.     bit    meaning
  455.     ---    -------
  456.     0    =0 if blank, =1 if non-blank.
  457.     7-1    not used.
  458.  
  459.  
  460. #(pm,S,E) "Push/Pop Mark"
  461.     This null-valued function allocates marks.  If the numeric
  462. argument S is positive and not zero, that number of local marks are
  463. allocated.  If the numeric argument S is negative, that number of
  464. permanent marks are allocated and all local marks are destroyed.  If the
  465. numeric argument S is zero, the current local marks are deallocated, and
  466. the previous local marks become available again.  If stack overflow or
  467. underflow occurs, the argument E is returned active.
  468.  
  469. #(sm,M,V) "Set Mark"
  470.     This function sets the mark given by argument M to the mark given
  471. by argument V.  If V is null, the point is used.
  472.  
  473. #(sp,M)    "Set Point"
  474.     This null-valued function causes the point to be set to the mark
  475. given by argument M.  Argument M may be a single mark or a sequence of
  476. marks.  #(sp,MN) is equivalent to #(sp,M)#(sp,N).
  477.  
  478. #(dm,M)    "Delete to Mark"
  479.     This null-valued function causes all text between the point and
  480. the mark given by argument M to be deleted.  Deleting large amount of text
  481. can take a long time, but #(dm,]) when the point is at the beginning of file
  482. is specially coded and takes little time.
  483.  
  484. #(rm,M,V) "Read Mark"
  485.     This function returns the characters between the point and the
  486. mark given by argument M.  If there is not enough string space, the
  487. argument V is returned active.
  488.  
  489. #(rc,M) "Read Count"
  490.     This function returns the number of characters between the point and the
  491. mark given by argument M.
  492.  
  493.  
  494. #(mb,M,Y,N) "Mark Before"
  495.     This function returns Y if the mark M is before the point, and N
  496. if the mark is after the point.
  497.  
  498.  
  499. #(lp,S)    "Look Pattern"
  500.     This function sets the pattern to be searched for with #(lk).
  501. No characters are special, but null should not be used.
  502.  
  503.  
  504. #(lr,S)    "Look Regexp"
  505.     This function sets the pattern to be searched for with #(lk).
  506. Certain characters have special meanings:
  507.     \    causes the following character to have no special meaning.
  508.     ^    matches the beginning of a line.
  509.     $    matches the end of a line.
  510.     ?    matches any single character.
  511.     [,;]    matches , or ; (for instance).
  512.     [a-z]    matches a-z (for instance).
  513.     [~a-z]    matches anything but a-z (for instance).
  514.     *    causes the previous character to be matched zero or more times.
  515.  
  516. #(lk,S,E,F,L,N) "Look"
  517.     This function searches between marks S and E for the pattern
  518. specified by #(lp).  If the pattern is found, the mark F is set to the
  519. point before the found string, and mark L is set to the point after the
  520. found string.  If S is not found, neither mark is changed, and argument N
  521. is returned active.  If S is null, then it defaults to the beginning of
  522. the file.  If E is null, then it defaults to the end of the file.  If F
  523. is null, it defaults to mark zero.  If L is null, it defaults to mark
  524. one.
  525.  
  526. #(rf,N)    "Read File"
  527.     This function reads the file named in argument N into the text
  528. buffer to the left of the point.  If no error occurs, the null string is
  529. returned.  If an error occurs, an error message is returned.  The
  530. possible messages are:
  531.     File not found
  532.     File too large
  533.     End of file
  534.  
  535. #(wf,N,M) "Write File"
  536.     This function writes text to the file named in argument N.  The
  537. text to be written is located between the point and the mark given in
  538. argument M.  If no error occurs, the null string is returned.  If an
  539. error occurs, an error message is returned.  The possible messages are:
  540.     Directory Full
  541.     Disk Full
  542.  
  543. #(ff,N,S) "Find Files"
  544.     This function returns the names of all the files that match
  545. argument N.  Wildcards are allowed.  Each file name is separated by argument S.
  546.  
  547. #(rn,O,N) "Rename file"
  548.     This function renames the file given in argument O to the name given in
  549. argument N.  Wildcards are not allowed.  If an error occurs, an error message
  550. is returned.  The possible messages are:
  551.     Rename error
  552.  
  553. #(de,N)    "Delete File"
  554.     This function deletes the file named in argument N.  Wildcards are not
  555. allowed.  If an error occurs, an error message is returned.  The possible
  556. messages are:
  557.     File not found
  558.  
  559. #(ev)    "Environment"
  560.     This function reads the MS-DOS environment.  All the environment
  561. strings are defined as strings with a prefix of "env.".  In addition, the
  562. arguments passed to emacs on the run line are defined as "env.RUNLINE".  The
  563. switch character used by MS-DOS is defined as "env.SWITCHAR".
  564.  
  565. #(it,T)    "Input Timed"
  566.     This function waits for T hundreths of a second for a key to be
  567. pressed on the keyboard.  If T is zero, the character (if one has been
  568. pressed) is not input.  If no key is pressed, "Timeout" is returned.  If
  569. a key is pressed before the timeout interval, then one of the following
  570. values is returned:
  571.  
  572.  
  573.     C-@    Control-@
  574.     C-A    Control-A
  575.     ...    The rest of the control characters are fashioned similarly.
  576.     C-_    Control-_
  577.          Space (a single space)
  578.     !    Bang
  579.     ...    The rest of the printables just return themselves
  580.     Delete
  581.  
  582. Emacs is written to be as machine independent as possible.  Therefore,
  583. your Emacs implementation may not implement all of the following keys.
  584. If the key has a shifted version, then the key name is preceded by 'S-'
  585. unless it is a standard ASCII character.  For example, C-_ is not
  586. returned as C-S--.  If your implementation has a Meta key (sometimes
  587. called Alt), then the key name from the list below (as well as those
  588. above) is preceded with 'M-'.  Note that other Emacs define control and
  589. meta keys to be C-M-x whereas Freemacs defines control and meta keys to
  590. be M-C-x.
  591.  
  592.     BackSpace    Not the same as C-H
  593.     Tab        Not the same as C-I
  594.     Return        Not the same as C-M
  595.     Escape        Not the same as C-[
  596.     Enter        Not the same as C-M
  597.     Help
  598.  
  599.     S-x        Shift version of any key (only non-ASCII).
  600.     C-x        Control version of any key (only non-ASCII).
  601.     M-x        Meta version of any key.
  602.  
  603.     F0,F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12    Etc.
  604.  
  605.     Ins
  606.     Del
  607.     I Chr
  608.     D Chr
  609.     Ins Line
  610.     Del Line
  611.  
  612.     Up Arrow
  613.     Down Arrow
  614.     Right Arrow
  615.     Left Arrow
  616.  
  617.     Home
  618.     End
  619.     Pg Up
  620.     Pg Dn
  621.     Break
  622.     Sys Req
  623.  
  624.     KP+,KP-,KP.    Keypad keys
  625.     KP0,KP1,KP2,KP3,KP4,KP5,KP6,KP7,KP8,KP9
  626.  
  627.     Left Down    Mouse buttons
  628.     Left Up
  629.     Right Down
  630.     Right Up
  631.     Middle Down
  632.     Middle Up
  633.  
  634.  
  635. #(bc,V,F,T) "Base Conversion"
  636.     This function converts the Value given in argument V From the
  637. base given in argument F To the base given in argument T.  Several
  638. different characters are used in the From  and To arguments, and are
  639. given in the table below.  From defaults to ASCII, and To defaults to
  640. decimal.
  641.       Character    Meaning
  642.        a or A    ASCII character.
  643.        d or D    decimal number.
  644.        h or H    hexadecimal number.
  645.        o or O    octal number.
  646.        b or B    binary number.
  647.  
  648.  
  649. #(nc,A) "Number of Characters"
  650.     This function returns the number of characters in the argument A.
  651.  
  652.  
  653. #(dt)    "Date"
  654.     This function returns the date in the form "mm/dd/yy" regardless of
  655. the country setting.
  656.  
  657.  
  658. #(tm)    "Time"
  659.     This function returns the time in the form "hh:mm:ss" regardless of
  660. the country setting.
  661.  
  662.  
  663. #(n?,F,Y,N)    "Name exists?"
  664.     This function tests for the existance of the string F and returns Y if
  665. found and N if not found.
  666.  
  667.  
  668. #(a?,A,B,Y,N)    "Alphabetic?"
  669.     This function returns Y if A is alphabetically less than B
  670. and N otherwise.
  671.  
  672.  
  673. #(sa,A,B,C,...)    "Sort Ascending"
  674.     The arguments A, B, C, etc. are returned in alphabetic ascending
  675. order seperated by commas.
  676.  
  677.  
  678. #(xy,X,Y) "X Y"
  679.     This function sets the screen location at which the next overwrite
  680. will occur.
  681.  
  682.  
  683. #(ow,S)    "Over Write"
  684.     This function overwrites the screen with the string S.  The next
  685. redisplay will rewrite the buffer's lines.  Subsequent over writes are
  686. equivalent to a single over write.  That is, #(ow,A)#(ow,B) is equivalent to
  687. #(ow,AB)
  688.  
  689.  
  690. #(hl,N)    "Halt"
  691.     Exits Emacs to MS-DOS with a return code of N (decimal).  Emacs
  692. will halt with a return code of one if 'emacs.ed' cannot be found.
  693.  
  694.  
  695. #(db)    "Debug"
  696.     Executes an interrupt 3 which should enter a debugger.  Do not use
  697. this if you haven't run DEBUG first!
  698.  
  699.  
  700. #(ex,F,A) "Execute Program"
  701.     Executes the program F, which must be a fully qualified pathname with
  702. an extension.  The arguments to the program are in A.  During the execution of
  703. the program, anything written to the device '@' will be inserted into the
  704. current emacs buffer.
  705.  
  706.  
  707. #(ef,F,A,M) "Execute Filter"
  708.     Executes the program F, which must be a fully qualified pathname with
  709. an extension.  The arguments to the program are in A.  If the program inputs
  710. from stdin, the input will be taken from the current buffer.  Only text from
  711. the point up to the mark M will be used.  If the mark is before the point, then
  712. no text will be used.  Any text used as input to the program gets deleted.  If
  713. the program doesn't do input, nothing will be deleted.  Anything written to
  714. stdout will be inserted into the current emacs buffer.
  715.